<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets" 
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:totoland="http://java.sun.com/jsf/composite/components">
    <h:head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link href="${request.contextPath}/resources/images/favicon.ico" rel="shortcut icon" type="image/x-icon" />
            <script src="${request.contextPath}/resources/js/html5.js"></script>
        <link rel="stylesheet" href="${request.contextPath}/resources/css/style.css" media="screen"/>
        
        <link rel="stylesheet" href="${request.contextPath}/resources/css/style.responsive.css" media="all"/>

    </h:head>
    <h:body id="body014">
        <p:blockUI block="body014"  widgetVar="blogui014">
            LOADING<br />
            <img src="${request.contextPath}/resources/images/preloader-01.gif"/>
        </p:blockUI>
        <p:ajaxStatus onstart="blogui014.show()" oncomplete="blogui014.hide()"/>
        <h:form>

            <p:panel id="REPORT_014" header="#{msg.report_014_header}">

                <p:panel id="REPORT_REPORT_014" header="#{formReport014Controller.reportTitle}">


                    <p:messages id="REPORT_014msgFrmDetails"></p:messages>

                    <script>
                        //<![CDATA[
                        function sum(obj) {
                            if (obj.value != 0) {
                                calSum();
                            }
                            return false;
                        }
                        //]]>
                    </script>

                    <p:remoteCommand name="calSum" update="REPORT_014pnlFrm" onstart="blogui014.show()" oncomplete="blogui014.hide()" actionListener="#{formReport014Controller.calSum()}">
                    </p:remoteCommand>

                    <p:panelGrid styleClass="frmDetail" id="REPORT_014pnlFrm" style="text-align: center;vertical-align: middle">
                        <f:facet name="header">
                            <p:row>  
                                <p:column rowspan="2" style="text-align: center;vertical-align: middle;width: 180px">สำนัก</p:column>
                                <p:column rowspan="2" style="text-align: center;vertical-align: middle;width: 90px">ทั้งหมด (เรื่อง) (1)</p:column>
                                <p:column rowspan="2" style="text-align: center;vertical-align: middle;width: 90px">อยู่ที่ส่วนกลาง (เรื่อง) (2)</p:column>
                                <p:column rowspan="2" style="text-align: center;vertical-align: middle;width: 90px">อยู่ที่ สนง. กกต.จว. (เรื่อง) (3)</p:column>
                                <p:column rowspan="2" style="text-align: center;vertical-align: middle;width: 90px">กกต. มีมติแล้ว (เรื่อง) (4)</p:column>
                                <p:column colspan="5" style="text-align: center;">สถานะเรื่องค้างที่ส่วนกลาง (เรื่อง)</p:column>
                            </p:row>
                            <p:row>
                                <p:column colspan="1" style="text-align: center;width: 90px">จนท. วิเคราะห์ (5)</p:column>
                                <p:column colspan="1" style="text-align: center;width: 90px">เสนอ ลธ.กกต. (6)</p:column>
                                <p:column colspan="1" style="text-align: center;width: 90px">เข้าคณะอนุฯ (7)</p:column>
                                <p:column colspan="1" style="text-align: center;width: 90px">อยู่ในวาระ กกต. (8)</p:column>
                                <p:column colspan="1" style="text-align: center;width: 90px">ส่ง สวค. ทำ ควฉ. (9)</p:column>
                            </p:row>
                        </f:facet>
                        <p:row>
                            <p:column>
                                <h:outputText value="#{formReport014Controller.report014Details[0].institution}"/>
                            </p:column>
                            <p:column>
                                <h:outputText value="#{formReport014Controller.report014Details[0].allAmount}"/>
                            </p:column>
                            <p:column>
                                <h:outputText value="#{formReport014Controller.report014Details[0].atCenter}"/>
                            </p:column>
                            <p:column>
                                <totoland:inputNumber onchange="sum(this)" disabled="#{formReport014Controller.paramMode=='view'}"  value="#{formReport014Controller.report014Details[0].atEctProvince}">

                                </totoland:inputNumber>
                            </p:column>
                            <p:column>
                                <totoland:inputNumber onchange="sum(this)" disabled="#{formReport014Controller.paramMode=='view'}"  value="#{formReport014Controller.report014Details[0].ectResolve}">

                                </totoland:inputNumber>
                            </p:column>
                            <p:column>
                                <totoland:inputNumber onchange="sum(this)" disabled="#{formReport014Controller.paramMode=='view'}"  value="#{formReport014Controller.report014Details[0].analystRemain}">

                                </totoland:inputNumber>
                            </p:column>
                            <p:column>
                                <totoland:inputNumber onchange="sum(this)" disabled="#{formReport014Controller.paramMode=='view'}"  value="#{formReport014Controller.report014Details[0].offerEct}">

                                </totoland:inputNumber>
                            </p:column>
                            <p:column>
                                <totoland:inputNumber onchange="sum(this)" disabled="#{formReport014Controller.paramMode=='view'}"  value="#{formReport014Controller.report014Details[0].accessCommittee}">

                                </totoland:inputNumber>
                            </p:column>
                            <p:column>
                                <totoland:inputNumber onchange="sum(this)" disabled="#{formReport014Controller.paramMode=='view'}"  value="#{formReport014Controller.report014Details[0].onAgenda}">

                                </totoland:inputNumber>
                            </p:column>
                            <p:column>
                                <totoland:inputNumber onchange="sum(this)" disabled="#{formReport014Controller.paramMode=='view'}" value="#{formReport014Controller.report014Details[0].sendRequest}">

                                </totoland:inputNumber>
                            </p:column>
                        </p:row>
                    </p:panelGrid>
                    
                    <p:panel header="หมายเหตุ" style="width:450px">
                        <p:inputTextarea maxlength="255" value="#{formReport014Controller.report014Details[0].remark}" disabled="#{formReport014Controller.paramMode=='view'}"/>
                    </p:panel>
                    <h:panelGroup id="REPORT_014pnlCmd" rendered="#{formReport014Controller.report014.flowStatusId!=200}">
                        <div align="center">
                            <p:commandButton value="#{msg.btn_save}" actionListener="#{formReport014Controller.save()}" id="REPORT_014btnSave" rendered="#{formReport014Controller.paramMode=='create'}"/>
                            <p:commandButton value="#{msg.btn_edit}" actionListener="#{formReport014Controller.goToEdit()}" id="REPORT_014btnEdit" rendered="#{formReport014Controller.paramMode=='view' 
                                                      and formReport014Controller.canEdit(formReport014Controller.report014.createdUserGroup,formReport014Controller.report014.reportStatus,formReport014Controller.report014.flowStatusId)}"/>
                            <p:commandButton value="#{msg.btn_close}" actionListener="#{formReport014Controller.goToClose()}" id="REPORT_014btnClose" rendered="#{formReport014Controller.paramMode=='view' || formReport014Controller.paramMode=='create'}"/>
                            <p:commandButton value="#{msg.btn_save}" actionListener="#{formReport014Controller.edit()}" id="REPORT_014btnSaveEdit" rendered="#{formReport014Controller.paramMode=='edit'}"/>
                            <p:commandButton value="#{msg.btn_cancel}" id="REPORT_014btnCancel" actionListener="#{formReport014Controller.goToCancel()}" rendered="#{formReport014Controller.paramMode=='edit'}"/>
                        </div>
                    </h:panelGroup>
                </p:panel>

            </p:panel>
        </h:form>
    </h:body>
</html>